﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace S.Archives.Api.Migrations
{
    public partial class 创建羊只档案表提示表 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "PromptModels",
                columns: table => new
                {
                    PromptId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    EITag = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
                    StateDays = table.Column<int>(type: "int", nullable: true),
                    State = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    BuildingName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    ColumnName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    Type = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    PromptType = table.Column<int>(type: "int", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_PromptModels", x => x.PromptId);
                });

            migrationBuilder.CreateTable(
                name: "SheepFileModel",
                columns: table => new
                {
                    SheepFileId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    EITag = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
                    ParentEITag = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
                    MotherEITag = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
                    Variety = table.Column<int>(type: "int", nullable: true),
                    Sex = table.Column<int>(type: "int", nullable: true),
                    BirthDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    BirthState = table.Column<int>(type: "int", nullable: true),
                    AdmissionDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    BirthPlace = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    BirthWeight = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    GeneRank = table.Column<int>(type: "int", nullable: true),
                    Remarks = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    ReproductiveState = table.Column<int>(type: "int", nullable: true),
                    PresenceState = table.Column<int>(type: "int", nullable: true),
                    IsPassAway = table.Column<bool>(type: "bit", nullable: true),
                    IsElimination = table.Column<bool>(type: "bit", nullable: true),
                    FileType = table.Column<int>(type: "int", nullable: true),
                    CreateBy = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateBy = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SheepFileModel", x => x.SheepFileId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "PromptModels");

            migrationBuilder.DropTable(
                name: "SheepFileModel");
        }
    }
}
